package com.lzh.mybatisdemo.controller;

import cn.hutool.core.convert.Converter;
import cn.hutool.core.convert.TypeConverter;
import cn.hutool.core.text.CharSequenceUtil;

import java.lang.reflect.Type;

public class RowColConverter implements TypeConverter {
    @Override
    public Object convert(Type targetType, Object value) {
        if (value instanceof DialogSingleBlockAccuracyCheckReport) {
            DialogSingleBlockAccuracyCheckReport sourceBean = (DialogSingleBlockAccuracyCheckReport) value;
            return CharSequenceUtil.format("{}x{}", sourceBean.getBlockRow(), sourceBean.getBlockColumn());
        }
        return null;
    }
}
